package com.lfs.market.controller.front;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.lfs.market.model.R;
import com.lfs.market.model.entity.ProductType;
import com.lfs.market.service.ProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/product/type")
@SaCheckLogin
public class ProductTypeController {
    @Autowired
    private ProductTypeService productTypeService;

    @GetMapping
    public R<List<ProductType>> getTypeList() {
        List<ProductType> list = productTypeService.list();
        return R.ok(list);
    }

}
